class EspDevice {
  final String? name;
  final String? address;
  final int? rssi;

  EspDevice({this.name, this.address, this.rssi});

  factory EspDevice.fromJson(Map<dynamic, dynamic> json) {
    return EspDevice(
      name: json['name'],
      address: json['address'],
      rssi: json['rssi'],
    );
  }
}

class DeviceWifi {
  final String? ssid;
  final int? rssi;
  final int? type;

  DeviceWifi({this.ssid, this.rssi, this.type});

  factory DeviceWifi.fromJson(Map<dynamic, dynamic> json) {
    return DeviceWifi(
      ssid: json['ssid'],
      rssi: json['rssi'],
      type: json['type'],
    );
  }
}

class DeviceStatus {
  int? code;
  int? opMode;
  String? bssid;
  String? ssid;
  String? password;
  String? message;

  DeviceStatus({this.code, this.opMode, this.bssid, this.ssid, this.password, this.message});

  factory DeviceStatus.fromJson(Map<dynamic, dynamic> json) {
    return DeviceStatus(
      code: json['code'],
      opMode: json['opMode'],
      bssid: json['bssid'],
      ssid: json['ssid'],
      password: json['password'],
      message: json['message'],
    );
  }
}

class OpMode{
  final int opModeNull = 0;
  final int opModeSta = 1;
  final int opModeSoftAP = 2;
  final int opModeStaSoftAP = 3;
}
